<template>
  <div
    @click="detail(item)"
    class="p-[10px] bg-white rounded-[5px] flex items-center mb-[10px]"
    v-for="item in list"
  >
    <van-image width="115" height="80" :src="item.banner" radius="5" />
    <div class="ml-[16px] flex flex-col justify-between min-h-[80px]">
      <div>
        <div
          class="text-[16px] whitespace-nowrap text-ellipsis overflow-hidden max-w-[200px]"
        >
          {{ item.name }}
        </div>
        <div class="text-[10px] text-[#B0B0B0] mt-[8px]">
          由{{ item.brand }}承保
        </div>
      </div>
      <div>
        <span class="text-[#EF6800] font-bold text-[17px]">{{
          item.price
        }}</span
        ><span class="text-[10px]">元/起</span>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { defineProps } from "vue";

defineProps({
  list: { type: Array<listType> },
});
interface listType {
  banner: string;
  name: string;
  brand: string;
  price: string;
}
const detail = (item: any) => {
  window.location.href = "/h5/detail?id=" + item.id;
};
</script>
<style scoped lang="scss"></style>
